package com.zhoug.share.ui;

import android.widget.ImageView;

import com.zhoug.common.adapters.recycler.BaseRecyclerViewAdapter;
import com.zhoug.common.adapters.recycler.BaseViewHolder;
import com.zhoug.share.R;


/**
 * 分享适配器
 */
 class ShareAdapter extends BaseRecyclerViewAdapter<ShareBean> {
    @Override
    public int getLayoutId(int viewType) {
        return R.layout.share_adapter_share;
    }

    @Override
    public void onBindData(BaseViewHolder holder, ShareBean data, int position, int viewType) {
        if(data!=null){
            holder.setText(R.id.tv_share_name, data.getText());
            ImageView imageView=holder.getView(R.id.iv_share_icon);
            imageView.setImageResource(data.getImageId());
        }
    }

}
